package com.swan.views;

import java.io.IOException;

import com.swan.App;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.layout.Pane;
import javafx.stage.Stage;
import javafx.scene.Scene;

/**
 * LoginApplication
 * @author xyh
 * @param <T>
 * @date 20230426
 *
 */
public class LoginApplication extends Application{
	
	@Override
    public void start(Stage stage) throws IOException {
		Pane root = FXMLLoader.load(App.class.getResource("Login.fxml"));
        Scene login = new Scene(root);
        stage.setTitle("Please Login ");
        stage.setScene(login);
        stage.show();
    }
 
    public static void main(String[] args) {
        launch(args);
    }
    
    public void changePwd() throws IOException {
    	Pane root = FXMLLoader.load(App.class.getResource("ChangePwd.fxml"));
        Scene login = new Scene(root);
        Stage stage = new Stage();
        stage.setTitle("Please Change Your Password ");
        stage.setScene(login);
        stage.show();
    }

    
    public void login() throws IOException {
    	Pane root = FXMLLoader.load(App.class.getResource("Login.fxml"));
        Scene login = new Scene(root);
        Stage stage = new Stage();
        stage.setTitle("Please Login ");
        stage.setScene(login);
        stage.show();
    }
}
